<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">

<TITLE>Switch -LOG[fmt][=name] - write names to log file</TITLE>
<link href="style.css" rel="stylesheet" type="text/css">
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<OBJECT TYPE="application/x-oleobject" CLASSID="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">

	<PARAM NAME="Keyword" VALUE="Switches: -LOG[fmt][=name] - write names to log file">
</OBJECT>

<P class="title"><A NAME="HELPSwLOG"></A>Switch <B>-LOG[fmt][=name]</B> -
write names to log file<hr></P>

<P>This switch allows to write archive and file names to specified text file
in archiving, extracting, deleting commands for RAR format and in archiving
commands for ZIP format. Its behavior is defined by 'fmt' string, which can
include one or more of following characters:</P>

<table border="1" cellspacing="0">
<tr>
<td>A</td>
<td>Write archive names to log file. If WinRAR creates or processes
volumes, all volume names are logged.</td>
</tr>

<tr>
<td>F</td>
<td>Write processed file names to log file. It includes files added to
archive and extracted, deleted or listed files inside of archive.</td>
</tr>

<tr>
<td>P</td>
<td>If log file with specified name exists, append data
to existing file instead of creating a new one.</td>
</tr>
            
<tr>
<td>U</td>
<td>Write data in Unicode format.</td>
</tr>
</table>

<p>If neither 'A' nor 'F' are specified, 'A' is assumed.</p>

<p>'name' parameter allows to specify the name of log file. It must be
separated from 'fmt' string by '=' character. If 'name' is not present,
WinRAR will use the default rarinfo.log file name.</p>

<p>It is allowed to specify several -log switches in the same command line.</p>

<p>This switch can be particularly useful, when you need to process
an archive created with <a href="HELPSwAG.htm">-ag</a> or 
<a href="HELPSwV.htm">-v</a> switches in a batch script.
You can specify -loga=arcname.txt when creating an archive and then read
an archive name generated by WinRAR from arcname.txt with an appropriate
command batch file command, like: set /p name=&lt;arcname.txt.</p>

<p>All functions of this switch are supported for RAR format only.
In case of ZIP format only archiving operations are supported.
Other archive formats do not support this switch.</p>

<h1><B>Examples</B></h1>

<ol>
  <li>write names of created volumes to vollist.txt</li>
</ol>
<blockquote>
  <p class="sample">WinRAR a -v100m -loga=vollist.txt volume.rar c:\data</p>
</blockquote>
<ol start="2">
  <li>write the generated archive name to backup.txt in Unicode</li>
</ol>
<blockquote>
  <p class="sample">WinRAR a -ag -logau=backup.txt backup.rar myfiles\*</p>
</blockquote>
<ol start="3">
  <li>write names of tested volumes to vollist.txt and names of tested
  archived files inside of volumes to filelist.txt</li>
</ol>
<blockquote>
  <p class="sample">WinRAR t -log=vollist.txt -logf=filelist.txt volume.part01.rar</p>
</blockquote>

</BODY>
</HTML>
